package com.example.demo.dao;


import com.example.demo.pojo.Product;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface IProductDao extends CrudRepository<Product, Integer> {

    @Query("select p from Product p where is_hot = 1")
    Page<Product> search(Pageable Pageable);

}
